/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_COMPTEG")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FCompteg.findAll", query = "SELECT f FROM FCompteg f"),
    @NamedQuery(name = "FCompteg.findByCGNum", query = "SELECT f FROM FCompteg f WHERE f.cGNum = :cGNum"),
    @NamedQuery(name = "FCompteg.findByCGType", query = "SELECT f FROM FCompteg f WHERE f.cGType = :cGType"),
    @NamedQuery(name = "FCompteg.findByCGIntitule", query = "SELECT f FROM FCompteg f WHERE f.cGIntitule = :cGIntitule"),
    @NamedQuery(name = "FCompteg.findByCGClassement", query = "SELECT f FROM FCompteg f WHERE f.cGClassement = :cGClassement"),
    @NamedQuery(name = "FCompteg.findByNNature", query = "SELECT f FROM FCompteg f WHERE f.nNature = :nNature"),
    @NamedQuery(name = "FCompteg.findByCGReport", query = "SELECT f FROM FCompteg f WHERE f.cGReport = :cGReport"),
    @NamedQuery(name = "FCompteg.findByCGRaccourci", query = "SELECT f FROM FCompteg f WHERE f.cGRaccourci = :cGRaccourci"),
    @NamedQuery(name = "FCompteg.findByCGSaut", query = "SELECT f FROM FCompteg f WHERE f.cGSaut = :cGSaut"),
    @NamedQuery(name = "FCompteg.findByCGRegroup", query = "SELECT f FROM FCompteg f WHERE f.cGRegroup = :cGRegroup"),
    @NamedQuery(name = "FCompteg.findByCGAnalytique", query = "SELECT f FROM FCompteg f WHERE f.cGAnalytique = :cGAnalytique"),
    @NamedQuery(name = "FCompteg.findByCGEcheance", query = "SELECT f FROM FCompteg f WHERE f.cGEcheance = :cGEcheance"),
    @NamedQuery(name = "FCompteg.findByCGQuantite", query = "SELECT f FROM FCompteg f WHERE f.cGQuantite = :cGQuantite"),
    @NamedQuery(name = "FCompteg.findByCGLettrage", query = "SELECT f FROM FCompteg f WHERE f.cGLettrage = :cGLettrage"),
    @NamedQuery(name = "FCompteg.findByCGTiers", query = "SELECT f FROM FCompteg f WHERE f.cGTiers = :cGTiers"),
    @NamedQuery(name = "FCompteg.findByCGDateCreate", query = "SELECT f FROM FCompteg f WHERE f.cGDateCreate = :cGDateCreate"),
    @NamedQuery(name = "FCompteg.findByCGDevise", query = "SELECT f FROM FCompteg f WHERE f.cGDevise = :cGDevise"),
    @NamedQuery(name = "FCompteg.findByNDevise", query = "SELECT f FROM FCompteg f WHERE f.nDevise = :nDevise"),
    @NamedQuery(name = "FCompteg.findByCGSommeil", query = "SELECT f FROM FCompteg f WHERE f.cGSommeil = :cGSommeil"),
    @NamedQuery(name = "FCompteg.findByCbProt", query = "SELECT f FROM FCompteg f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FCompteg.findByCbMarq", query = "SELECT f FROM FCompteg f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FCompteg.findByCbCreateur", query = "SELECT f FROM FCompteg f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FCompteg.findByCbModification", query = "SELECT f FROM FCompteg f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FCompteg.findByCbReplication", query = "SELECT f FROM FCompteg f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FCompteg.findByCbFlag", query = "SELECT f FROM FCompteg f WHERE f.cbFlag = :cbFlag")})
public class FCompteg implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "CG_Num")
    private String cGNum;
    @Lob
    @Column(name = "cbCG_Num")
    private byte[] cbCGNum;
    @Column(name = "CG_Type")
    private Short cGType;
    @Column(name = "CG_Intitule")
    private String cGIntitule;
    @Column(name = "CG_Classement")
    private String cGClassement;
    @Lob
    @Column(name = "cbCG_Classement")
    private byte[] cbCGClassement;
    @Column(name = "N_Nature")
    private Short nNature;
    @Column(name = "CG_Report")
    private Short cGReport;
    @Lob
    @Column(name = "cbCR_Num")
    private byte[] cbCRNum;
    @Column(name = "CG_Raccourci")
    private String cGRaccourci;
    @Lob
    @Column(name = "cbCG_Raccourci")
    private byte[] cbCGRaccourci;
    @Column(name = "CG_Saut")
    private Short cGSaut;
    @Column(name = "CG_Regroup")
    private Short cGRegroup;
    @Column(name = "CG_Analytique")
    private Short cGAnalytique;
    @Column(name = "CG_Echeance")
    private Short cGEcheance;
    @Column(name = "CG_Quantite")
    private Short cGQuantite;
    @Column(name = "CG_Lettrage")
    private Short cGLettrage;
    @Column(name = "CG_Tiers")
    private Short cGTiers;
    @Column(name = "CG_DateCreate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cGDateCreate;
    @Column(name = "CG_Devise")
    private Short cGDevise;
    @Column(name = "N_Devise")
    private Short nDevise;
    @Lob
    @Column(name = "cbTA_Code")
    private byte[] cbTACode;
    @Column(name = "CG_Sommeil")
    private Short cGSommeil;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cGNumPrinc")
    private Collection<FComptet> fComptetCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cGNum")
    private Collection<FTaxe> fTaxeCollection;
    @OneToMany(mappedBy = "cGNum")
    private Collection<FDocentete> fDocenteteCollection;
    @JoinColumn(name = "CR_Num", referencedColumnName = "CR_Num")
    @ManyToOne
    private FCompter cRNum;
    @JoinColumn(name = "TA_Code", referencedColumnName = "TA_Code")
    @ManyToOne
    private FTaxe tACode;

    public FCompteg() {
    }

    public FCompteg(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FCompteg(Integer cbMarq, String cGNum) {
        this.cbMarq = cbMarq;
        this.cGNum = cGNum;
    }

    public String getCGNum() {
        return cGNum;
    }

    public void setCGNum(String cGNum) {
        this.cGNum = cGNum;
    }

    public byte[] getCbCGNum() {
        return cbCGNum;
    }

    public void setCbCGNum(byte[] cbCGNum) {
        this.cbCGNum = cbCGNum;
    }

    public Short getCGType() {
        return cGType;
    }

    public void setCGType(Short cGType) {
        this.cGType = cGType;
    }

    public String getCGIntitule() {
        return cGIntitule;
    }

    public void setCGIntitule(String cGIntitule) {
        this.cGIntitule = cGIntitule;
    }

    public String getCGClassement() {
        return cGClassement;
    }

    public void setCGClassement(String cGClassement) {
        this.cGClassement = cGClassement;
    }

    public byte[] getCbCGClassement() {
        return cbCGClassement;
    }

    public void setCbCGClassement(byte[] cbCGClassement) {
        this.cbCGClassement = cbCGClassement;
    }

    public Short getNNature() {
        return nNature;
    }

    public void setNNature(Short nNature) {
        this.nNature = nNature;
    }

    public Short getCGReport() {
        return cGReport;
    }

    public void setCGReport(Short cGReport) {
        this.cGReport = cGReport;
    }

    public byte[] getCbCRNum() {
        return cbCRNum;
    }

    public void setCbCRNum(byte[] cbCRNum) {
        this.cbCRNum = cbCRNum;
    }

    public String getCGRaccourci() {
        return cGRaccourci;
    }

    public void setCGRaccourci(String cGRaccourci) {
        this.cGRaccourci = cGRaccourci;
    }

    public byte[] getCbCGRaccourci() {
        return cbCGRaccourci;
    }

    public void setCbCGRaccourci(byte[] cbCGRaccourci) {
        this.cbCGRaccourci = cbCGRaccourci;
    }

    public Short getCGSaut() {
        return cGSaut;
    }

    public void setCGSaut(Short cGSaut) {
        this.cGSaut = cGSaut;
    }

    public Short getCGRegroup() {
        return cGRegroup;
    }

    public void setCGRegroup(Short cGRegroup) {
        this.cGRegroup = cGRegroup;
    }

    public Short getCGAnalytique() {
        return cGAnalytique;
    }

    public void setCGAnalytique(Short cGAnalytique) {
        this.cGAnalytique = cGAnalytique;
    }

    public Short getCGEcheance() {
        return cGEcheance;
    }

    public void setCGEcheance(Short cGEcheance) {
        this.cGEcheance = cGEcheance;
    }

    public Short getCGQuantite() {
        return cGQuantite;
    }

    public void setCGQuantite(Short cGQuantite) {
        this.cGQuantite = cGQuantite;
    }

    public Short getCGLettrage() {
        return cGLettrage;
    }

    public void setCGLettrage(Short cGLettrage) {
        this.cGLettrage = cGLettrage;
    }

    public Short getCGTiers() {
        return cGTiers;
    }

    public void setCGTiers(Short cGTiers) {
        this.cGTiers = cGTiers;
    }

    public Date getCGDateCreate() {
        return cGDateCreate;
    }

    public void setCGDateCreate(Date cGDateCreate) {
        this.cGDateCreate = cGDateCreate;
    }

    public Short getCGDevise() {
        return cGDevise;
    }

    public void setCGDevise(Short cGDevise) {
        this.cGDevise = cGDevise;
    }

    public Short getNDevise() {
        return nDevise;
    }

    public void setNDevise(Short nDevise) {
        this.nDevise = nDevise;
    }

    public byte[] getCbTACode() {
        return cbTACode;
    }

    public void setCbTACode(byte[] cbTACode) {
        this.cbTACode = cbTACode;
    }

    public Short getCGSommeil() {
        return cGSommeil;
    }

    public void setCGSommeil(Short cGSommeil) {
        this.cGSommeil = cGSommeil;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FComptet> getFComptetCollection() {
        return fComptetCollection;
    }

    public void setFComptetCollection(Collection<FComptet> fComptetCollection) {
        this.fComptetCollection = fComptetCollection;
    }

    @XmlTransient
    public Collection<FTaxe> getFTaxeCollection() {
        return fTaxeCollection;
    }

    public void setFTaxeCollection(Collection<FTaxe> fTaxeCollection) {
        this.fTaxeCollection = fTaxeCollection;
    }

    @XmlTransient
    public Collection<FDocentete> getFDocenteteCollection() {
        return fDocenteteCollection;
    }

    public void setFDocenteteCollection(Collection<FDocentete> fDocenteteCollection) {
        this.fDocenteteCollection = fDocenteteCollection;
    }

    public FCompter getCRNum() {
        return cRNum;
    }

    public void setCRNum(FCompter cRNum) {
        this.cRNum = cRNum;
    }

    public FTaxe getTACode() {
        return tACode;
    }

    public void setTACode(FTaxe tACode) {
        this.tACode = tACode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FCompteg)) {
            return false;
        }
        FCompteg other = (FCompteg) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FCompteg[ cbMarq=" + cbMarq + " ]";
    }
    
}
